#include <stdio.h>

int main()
{
    int number, count = 0, minimum = -1, maximum = -1;

    scanf("%d", &number);
    minimum = maximum = number;
    count++;

    while (scanf("%d", &number) == 1 && number != -1)
    {
        if (minimum > number)
            minimum = number;
        if (maximum < number)
            maximum = number;
        count++;
    }

    printf("%d %d %d\n", count, maximum, minimum);
    return 0;
}
